$title: title object related to the revision
$rev: revision (object) that will be viewed
+'UnitTestsAfterDatabaseSetup': Called right after MediaWiki's test infrastructure
+has finished creating/duplicating core tables for unit tests.
+$database: Database in question
+$prefix: Table prefix to be used in unit tests
+
+'UnitTestsBeforeDatabaseTeardown': Called right before MediaWiki tears down its
+database infrastructure used for unit tests.
+
'UnitTestsList': Called when building a list of paths containing PHPUnit tests.
Since 1.24: Paths pointing to a directory will be recursively scanned for
test case files matching the suffix "Test.php".
use MediaWiki\Logger\MonologSpi;
use MediaWiki\MediaWikiServices;
use Psr\Log\LoggerInterface;
+use Wikimedia\Rdbms\IMaintainableDatabase;
+use Wikimedia\Rdbms\Database;
use Wikimedia\TestingAccessWrapper;
/**
return;
}
+ Hooks::run( 'UnitTestsBeforeDatabaseTeardown' );
+
foreach ( $wgJobClasses as $type => $class ) {
// Delete any jobs under the clone DB (or old prefix in other stores)
JobQueueGroup::singleton()->get( $type )->delete();
if ( $db->getType() == 'oracle' ) {
$db->query( 'BEGIN FILL_WIKI_INFO; END;' );
}
+
+ Hooks::run( 'UnitTestsAfterDatabaseSetup', [ $db, $prefix ] );
}
/**